#include<sys/ipc.h>
#include<sys/shm.h>
#include<stdlib.h>
#include<stdio.h>
#include<errno.h>
using namespace std;
#include<iostream>
int main()
{
    int id =shmget(1,4096,IPC_CREAT | IPC_EXCL | 0664);
    struct shmid_ds buf;
    shmctl(id,IPC_STAT,&buf);
    cout<<"atime:"<<buf.shm_atime<<endl;
    buf.shm_atime=0;
    shmctl(id,IPC_SET,&buf);
    shmctl(id,IPC_STAT,&buf);
    cout<<"atime:"<<buf.shm_atime<<endl;
    return 0;
}